package strategy1;

import java.util.Date;

public class TaskDemo {
    public static void main(String[] args) {
        Date now = new Date();

        // 创建上下文数据
        TaskContext firstVisitContext = new TaskContext("P001", now);
        TaskContext regularVisitContext = new TaskContext("P002", now, 30);

        // 生成首次随访任务
        System.out.println("=== 生成首次随访任务 ===");
        TaskGeneratorFactory.generateTask(TaskType.FIRST_VISIT, firstVisitContext);

        System.out.println("\n=== 生成常规随访任务 ===");
        // 生成常规随访任务
        TaskGeneratorFactory.generateTask(TaskType.REGULAR_VISIT, regularVisitContext);

        System.out.println("\n=== 测试数据校验 ===");
        // 测试数据校验（缺少用药天数）
        TaskContext invalidContext = new TaskContext("P003", now);
        TaskGeneratorFactory.generateTask(TaskType.FIRST_VISIT, invalidContext);
    }
}
